package com.flyme.module.exam.client.api;


import com.flyme.common.core.model.ResultBody;
import com.flyme.module.exam.client.entity.ExamType;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author zyf
 */
@RequestMapping("/examtype")
public interface ExamTypeRemoteService {

    /**
     * 获取题目分类
     */
    @PostMapping(value="/tree")
    ResultBody<List<ExamType>> tree(@ModelAttribute(value = "examType") ExamType examType);

    /**
     * 获取题目分类
     */
    @PostMapping(value="/treeRank")
    ResultBody<List<ExamType>> treeRank(@ModelAttribute(value = "examType") ExamType examType);

    /**
     * 添加题目分类
     * @param examType
     * @return
     */
    @PostMapping(value="/insert")
    ResultBody insert(@ModelAttribute(value = "examType") ExamType examType);

    /**
     * 更新题目分类
     *
     * @param examType
     * @return
     */
    @PostMapping("/edit")
    ResultBody edit(@ModelAttribute(value = "examType") ExamType examType);
    /**
     * 删除题目分类
     *
     * @param id 分类ID
     * @return
     */
    @PostMapping(value="/delById/{id}")
    ResultBody delById(@PathVariable Long id);
}
